OTScheduleSystemTask
Schedules a task for execution at system task time.C INTERFACE
Boolean OTScheduleSystemTask(long stCookie)C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
stCookie
- A reference that identifies the task to be scheduled.
DESCRIPTION
TheOTScheduleSystemTask
function schedules for execution at system task time the task associated with thestCookie
parameter, which is the reference returned by theOTCreateSystemTask
function.You can call this function at any time. If you have not yet destroyed a task, you can use this function to reschedule the same task again once it has executed. If you have canceled a task, you can use this function to schedule it again.
If you makes multiple calls to the
OTScheduleSystemTask
function before the task is executed, additional tasks are not scheduled; only one instance of each unique task can only be scheduled at a time.This function returns
true
if it scheduled the system task successfully,false
if not. If the function returnsfalse
and thestCookie
parameter has a valid value (other than 0), then the task is already scheduled to run. IfstCookie
is invalid (a value of 0), the function returnsfalse
and does nothing.SPECIAL CONSIDERATIONS
You can call this Open Transport function at interrupt time, but you must precede it by calling theOTEnterInterrupt
function and you must follow it by calling theOTLeaveInterrupt
function.SEE ALSO
To create a system task, call theOTCreateSystemTask
function (page 7-9).To destroy a system task created with the
OTCreateSystemTask
function, call theOTDestroySystemTask
function (page 7-13).To cancel a task scheduled for execution at system task time, call the
OTCancelSystemTask
function (page 7-12).Before making this call from within an interrupt, use the
OTEnterInterrupt
function (page 7-19).After you have made this call from within an an interrupt, use the
OTLeaveInterrupt
function (page 7-20).